/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-05-10 14:08:03
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-05-31 10:36:24
 * @FilePath: \ken147258.topayClient\src\api\other\behavior.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */

import request from "@/utils/request";
import { AxiosPromise } from "axios";

const URL = {
  list: '/platformApi/black/list',  // 获取列表数据
  add: '/platformApi/black/add', // 添加黑名单数据
  edit: '/platformApi/black/edit',  // 编辑黑名单数据
  delete: '/platformApi/black/delete',  // 删除黑名单数据
};

export function list(data: object): AxiosPromise<any> {
  return request({
    url: URL.list,
    method: "get",
    params: data,
  });
}

export function add(data: object): AxiosPromise<any> {
  return request({
    url: URL.add,
    method: "post",
    data: data,
  });
}

export function edit(data: object): AxiosPromise<any> {
  return request({
    url: URL.edit,
    method: "post",
    data: data,
  });
}

export function deleteByIds(data: object): AxiosPromise<any> {
  return request({
    url: URL.delete,
    method: "get",
    params: data,
  });
}
